<template>
	<view>
		<view class="info">
			<view class="title">
				{{info.name}}
			</view>
			<view class="rate">
				<view class="left">
					<uni-rate :readonly="true" activeColor="#51C76C" :value="4.5" />
				</view>
				<view class="right">
					{{info.learnTotal}}人正在学
				</view>
			</view>
			<view class="price">
				￥{{info.salePrice}} <text>￥{{info.listPrice}}</text>
			</view>
		</view>
		<view class="author">
			<image :src="info.teacharAvatarUrl" mode=""></image>
			<view class="text">
				<view class="name">
					{{info.teachar}}
				</view>
				666粉丝
			</view>
			<uni-icons type="right" size="22" color="#999"></uni-icons>
		</view>
		<view class="introduce container">
			<view class="title">
				课程介绍
			</view>
			<image class="banner" :src="info.imageUrl" mode=""></image>
			{{info.content}}
		</view>
		<!-- <view class="payInfo">
			<view class="btn">
				立即学习
			</view>
		</view> -->
		<view class="seat">

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				active: 0
			}
		},
		props: {
			info: {}
		},
		methods: {}
	}
</script>

<style lang="scss">
	.info {
		margin-bottom: 20rpx;
		background-color: #fff;
		padding: 20rpx 40rpx;

		.title {
			font-weight: bold;
			padding: 10rpx 0;
		}

		.price {
			color: red;
			font-weight: bold;
			font-size: 36rpx;

			text {
				font-size: 24rpx;
				color: #999;
				font-weight: normal;
				text-decoration: line-through;
			}
		}
	}

	.rate {
		display: flex;
		align-items: center;
		justify-content: space-between;

		.right {
			font-size: 24rpx;
			color: #999999;
		}
	}

	.author {
		position: relative;
		display: flex;
		align-items: center;
		background-color: #fff;
		padding: 20rpx 40rpx;

		image {
			display: block;
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			margin-right: 16rpx;
		}

		.text {
			font-size: 24rpx;
			color: #999;

			.name {
				font-size: 28rpx;
				color: #333;
			}
		}

		.uni-icons {
			position: absolute;
			right: 40rpx;
		}
	}

	.introduce {
		font-size: 28rpx;

		.title {
			font-weight: bold;
			font-size: 36rpx;
			margin-bottom: 20rpx;
		}
	}

	.payInfo {
		width: 100%;
		height: 110rpx;
		position: fixed;
		left: 0%;
		bottom: 0;
		padding: 0 40rpx;

		.price {
			font-weight: bold;
			color: red;
			font-size: 40rpx;
		}

		.btn {
			background: linear-gradient(180deg, rgba(130, 234, 154, 1) 0%, rgba(81, 199, 108, 1) 100%);
			color: #fff;
			font-size: 32rpx;
			text-align: center;
			line-height: 60rpx;
			border-radius: 100rpx;
			line-height: 80rpx;
			box-shadow: 0px 3px 6px 0px rgba(81, 199, 108, 0.4);
			border: 1px solid rgba(81, 199, 108, 1);
		}
	}

	.seat {
		height: 110rpx;
	}
</style>